<script setup lang="ts">
import { ref } from "vue";
import { Config, EventBus, Store } from "../../../main";

const changeLayout = () => {
  Store.Common.setHideLayout(!Store.Common.getHideLayout());
  EventBus.emit(Config.Event.changeLayoutShow, Store.Common.getHideLayout());
};

const username = ref("");
const password = ref("");
const surePassword = ref("");
const tel = ref("");
const submit = () => {
  //   alert("用户名不能为空");
  //   alert("密码不能为空");
  //   alert("密码不一致");
  // alert("电话不能为空");
};
</script>

<template>
  <h2 @click="changeLayout" style="color: transparent; height: 10vh">网络异常，请联系管理员</h2>
  <div class="box">
    <label for=""
      ><div style="display: inline-block; width: 100px; font-size: 20px; font-weight: bold; text-align: left">用户名</div>
      <input type="text" v-model="username" />
      <span style="display: inline-block; width: 200px; font-size: 20px; font-weight: bold; color: red"></span>
    </label>
    <label for=""
      ><div style="display: inline-block; width: 100px; font-size: 20px; font-weight: bold; text-align: left">密码</div>
      <input type="password" v-model="password" />
      <span style="display: inline-block; width: 200px; font-size: 20px; font-weight: bold; color: red"></span>
    </label>
    <label for=""
      ><div style="display: inline-block; width: 100px; font-size: 20px; font-weight: bold; text-align: left">确认密码</div>
      <input type="password" v-model="surePassword" />
      <span style="display: inline-block; width: 200px; font-size: 20px; font-weight: bold; color: red"></span>
    </label>
    <label for=""
      ><div style="display: inline-block; width: 100px; font-size: 20px; font-weight: bold; text-align: left">联系电话</div>
      <input type="text" v-model="tel" />
      <span style="display: inline-block; width: 200px; font-size: 20px; font-weight: bold; color: red"></span>
    </label>
    <label for="">
      <button @click="submit">提交</button>
    </label>
    <span style="display: inline-block; width: 200px; font-size: 20px; font-weight: bold; color: red">zyf1注册成功，请登录</span>
  </div>
</template>
<style scoped>
.box {
  display: flex;
  margin-left: 20vw;
  margin-top: 20vh;
  flex-direction: column;
  height: 25vh;
  justify-content: space-around;
  align-items: center;
  width: 40vw;
}
</style>
